Managing MIDI Recording

After you open a MIDI device, you can begin recording MIDI data. Windows provides the following functions for managing MIDI recording:

midiInAddBufferX_0FK6

Sends a buffer to the device driver so it can be filled with recorded system-exclusive MIDI data.

midiInReset164KB8X

Stops MIDI recording and marks all pending buffers as done.

midiInStart2EHFZIM

Starts MIDI recording and resets the time stamp to zero.

midiInStopFV1VZT

Stops MIDI recording.

 

To send buffers to the device driver for recording system-exclusive messages, use midiInAddBufferX_0FK6. The application is notified as the buffers are filled with system-exclusive recorded data. For more information about the notification techniques, see Managing MIDI Data Blocks109WNG9.

The midiInStart2EHFZIM function begins the recording process. When recording system-exclusive messages, send at least one buffer to the driver before starting recording. To stop recording, use midiInStopFV1VZT. Before closing the device by using the midiInClose37AK_6N function, mark any pending data blocks as being done by calling midiInReset164KB8X.

Applications that require time-stamped data use a callback function to receive MIDI data. If your timing requirements are not strict, you can use a window or thread callback. However, you cannot use an event callback to receive MIDI data.

To record system-exclusive messages with applications that do not use stream buffers, you must supply the device driver with buffers. These buffers are specified by using a MIDIHDR8OW3.JO structure.